package com.woniu.utils;

/**
 * @author jiang
 */
public enum EnumException{
    ORDER_NULL_EXCEPTION(10001,"订单为空"),
    STORE_NULL_EXCEPTION(10002,"店铺为空"),
    COMMENTUPLOADIMG_NULL_EXCEPTION(10003,"上传照片为空"),
    COMMENT_NULL_EXCEPTION(10004,"没有此评论"),
    ORDER_STATE_EXCEPTION(10005,"订单状态异常"),
    ORDERLOG_ERROR_EXCEPTION(10006, "订单日志异常"),
    ORDER_ACCOUNT_EXCEPTION(10007,"订单金额异常,请刷新购物车"),
    STORE_TIME_EXCEPTION(10008,"店铺已打烊" ),
    STORE_PRODUCT_STATE_EXCEPTION(10009,"购物车商品已下架"),
    ADDRESS_NULL_EXCEPTION(10010,"地址为空"),
    FoodType_NULL_EXCEPTION(10011,"菜品类型为空"),
    APPLY_FOR_STORE_EXCEPTION(10012,"已经提交申请，请不要重复提交" ),
    REDIS_SYNC_FAILED(10025, "Redis同步失败"),
    USER_NULL_EXCEPTION(30001,"用户为空"),
    NET_ERROR_EXCEPTION(40001,"网络异常"),
    ALIPAY_ERROR_EXCEPTION(40002,"支付宝请求异常"),
    COMMENTUPLOADIMG_TYPE_EXCEPTION(10004, "文件上传格式错误"),
    INVALID_PARAMETER(20006, "无效参数"),
    REPAIR_NOT_FOUND(20007, "维修记录未找到"),
    UPLOAD_FAILED(20008, "上传失败"),
    REPAIR_DELETED(20009, "维修记录已被删除"),
    DATABASE_ERROR(20010, "数据库错误"),
    PRODUCT_DELETE_FAILURE(70001, "删除失败"),
    REPAIR_MATERIAL_EXIST(30003, "材料编号已存在"),
    REPAIR_MATERIAL_NOT_EXIST(30004, "材料不存在"),
    REPAIR_NOTICE_NOT_FOUND(30005, "维修公告未找到"),
    REPAIR_NOTICE_ALREADY_EXISTS(30006, "维修公告已存在"),
    REPAIR_NOTICE_UPDATE_FAILED(30007, "维修公告更新失败"),
    REPAIR_NOTICE_DELETE_FAILED(30008, "维修公告删除失败"),
    CATEGORY_NAME_NULL(80001, "类别名称不能为空"),
    CATEGORY_ALREADY_EXISTS(80002, "该类别已存在"),
    ADD_CATEGORY_FAILED(80003, "添加类别失败"),
    UPDATE_CATEGORY_FAILED(80004, "更新类别失败"),
    NOTICE_TITLE_REQUIRED(10015, "通知标题不能为空"),
    NOTICE_CONTENT_REQUIRED(10016, "通知内容不能为空"),
    FILE_SIZE_EXCEEDED(10017, "文件大小超出限制"),
    FILE_UPLOAD_FAILED(10018, "文件上传失败"),
    REPAIR_LOG_INSERT_FAILED(30009, "维修日志插入失败"),
    REPAIR_LOG_SEARCH_FAILED(30010, "维修日志搜索失败"),
    MATERIAL_INVENTORY_INSUFFICIENT(30011, "材料库存不足"),
    MATERIAL_INSERT_FAILED(30012, "材料插入失败"),
    MATERIAL_UPDATE_FAILED(30013, "材料更新失败"),
    REPAIR_NOTICE_SYNC_FAILED(30014, "维修公告同步失败"),
    ;

    private Integer code;
    private String msg;

    EnumException(Integer code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public Integer getCode() {
        return code;
    }

    public String getMsg() {
        return msg;
    }
}
